package com.cet.lxf.oop.test04;

import java.util.StringJoiner;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-06-25 17:15
 **/
public class Main06 {
    public static void main(String[] args) {
        String[] names = {"Bob", "Alice", "Grace"};
        StringJoiner sj = new StringJoiner(", ", "Hello ", "!");
        for (String name : names) {
            sj.add(name);
        }
        System.out.println(sj.toString());
    }
}
